"""
None

A FletX application.
Author: admin
Version: 0.1.0
"""

import flet as ft
from fletx.app import FletXApp
from fletx.utils import AppContext

from app.routes import ClientRouter



def main(page: ft.Page):
    """Main entry point for the Flet application."""

    # Configure Page
    page.title = "client"

    # Setting up theme
    page.theme = ft.Theme(
        color_scheme_seed=ft.Colors.GREEN
    )
    page.dark_theme = ft.Theme(
        color_scheme_seed=ft.Colors.BLUE_800,
        scaffold_bgcolor=ft.Colors.BLACK,
    )
    page.theme_mode = ft.ThemeMode.DARK

    # Setting up window size
    page.window.height = 680
    page.window.width = 860

    # FletX Application Initialization
    app = FletXApp(
        initial_route="/",
        debug=True
    )

    AppContext.initialize(page)
    app._main(page)

def start():
    """Start the Flet application."""
    ft.app(target=main)


if __name__ == "__main__":
    start()
